<?php
/**
 * created by zzy
 * date: 2017/10/20 18:00
 */

namespace App\Http\Admin\Company\Models;
use App\Eloquent\Ygt\Privilege as YgtPrivilege;

class Privilege extends YgtPrivilege{

    public static function getJsonList( $where='' )
    {
        $lists              = self::getList($where,'id,title')->toArray();
        $result             = [ [0=>'请选择'] ];
        foreach( $lists as $key=>$val ){
            $arr            = [ $val['id']=>$val['title'] ];
            $result[]       = $arr;
        }
        $json               = json_encode( $result );
        return $json;
    }

}